package com.example.demo;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * @author cyh
 */
@WebFilter(urlPatterns = "/*")
public class ChangeFilter implements Filter {

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {

        DemoHttpServletWrapper demoHttpServletWrapper = new DemoHttpServletWrapper((HttpServletRequest) servletRequest);
        filterChain.doFilter(demoHttpServletWrapper,servletResponse);
    }

}
